package com.nms.se.regulation;

public class Regulation {

	public static final String a = "<a\\s[^<>]*[\\s]*href=[^<>]+[\\s]*>";
	private String url;
	private String linkRegex;
	private String contentRegex;

	public Regulation() {
	}

	public Regulation(String url, String linkRegex, String contentRegex) {
		this.url = url;
		this.linkRegex = linkRegex;
		this.contentRegex = contentRegex;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getLinkRegex() {
		return linkRegex;
	}

	public void setLinkRegex(String linkRegex) {
		this.linkRegex = linkRegex;
	}

	public String getContentRegex() {
		return contentRegex;
	}

	public void setContentRegex(String contentRegex) {
		this.contentRegex = contentRegex;
	}

	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Regulation) {
			Regulation r = (Regulation) obj;
			if (r.getUrl().equals(this.getUrl())
					&& r.getLinkRegex().equals(this.getLinkRegex())
					&& r.getContentRegex().equals(this.getContentRegex()))
				return true;
		}
		return false;
	}

}
